subscribed.event
An event structure representing a one-to-many function/delegate relationship.
-
Declaration
structEvent(T) if (isCallable!T);An event structure representing a one-to-many function/delegate relationship. It mimics a function by overriding the call operator. It also implements the bidirectional range interface.
Parameters
TThe listener type this event contains.
-
Declaration
aliasListenerType= T;The listeners' type.
-
Declaration
aliasReturnType= void;The event's return type.
-
Declaration
aliasParamTypes= ParameterTypeTuple!T;The event's argument type tuple.
-
Declaration
const size_tsize();The number of listeners.
-
Declaration
autolisteners();A range array of all the
listeners. -
Declaration
const boolempty();A boolean property indicating whether there are listeners. Part of the bidirectional range interface.
-
Declaration
const Tfront();Get the first listener or throw an error if there are no listeners. Part of the bidirectional range interface.
-
Declaration
voidpopFront();Remove the first listener or throw an error if there are no listeners. Part of the bidirectional range interface.
-
Declaration
voidprepend(T[]listeners...);Prepend
listenersto the listener collection.Parameters
T[]listenersThe
listenersto insert. -
Declaration
const Tback();Get the last listener or throw an error if there are no listeners. Part of the bidirectional range interface.
-
Declaration
voidpopBack();Remove the last listener or throw an error if there are no listeners. Part of the bidirectional range interface.
-
Declaration
voidappend(T[]listeners...);Appends a listener to the listener collection.
Parameters
T[]listenersThe
listenersto insert. -
Declaration
voidremove(T[]listeners...);Removed all occurrences of the given
listeners.Parameters
T[]listenersThe
listenerstoremove. -
Declaration
voidclear();Clears all listeners.
-
Declaration
voidcall(ParamTypesparams);Calls all the registered listeners in order.
Parameters
ParamTypesparamsThe param tuple to
callthe listener with. -
Declaration
voidopCall(ParamTypesparams);Aliases
call. -
Declaration
autosave();Copies the event to allow multiple range-like iteration. Part of the bidirectional range interface.
-
Declaration
autoopSlice(); -
Declaration
voidopOpAssign(string s : "~")(Tlistener);Aliases
append. -
Declaration
voidopOpAssign(string s : "-")(Tlistener);Aliases
remove.
-